package cn.wolfcode.mapper;

import cn.wolfcode.domain.Announcement;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AnnouncementMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Announcement record);

    Announcement selectByPrimaryKey(Long id);

    List<Announcement> selectAll();

    int updateByPrimaryKey(Announcement record);

    List<Announcement> selectForList(QueryObject qo);

    //找所有已读的公告id
    List<Long> selectHasRead(Long id);

    void addHasRead(@Param("e_id") Long e_id, @Param("anno_id") Long anno_id);

    void InitRead();

    List<Announcement> selectNoRead();

}